#!usr/bin/env python  
# -*- coding: utf-8 -*-#

#-------------------------------------------------------------------------------
# Name:         TurtleUtil
# Description:  
# Author:       dyg
# Date:         2018/2/8
#-------------------------------------------------------------------------------

import turtle,time
t = turtle.Pen()

# # 正方形
# for x in range(1,5):
#     t.forward(100)
#     t.left(90)
# time.sleep(3)
#
# #清空画布
# t.reset()
#
# # 多边形
# for x in range(1,7):
#     t.forward(100)
#     t.left(60)
# time.sleep(3)
#
# #清空画布
# t.reset()
#
# #星星
# for x in range(1,9):
#     t.forward(100)
#     t.left(225)
# time.sleep(3)
#
# #清空画布
# t.reset()
#
# for x in range(1,38):
#     t.forward(100)
#     t.left(175)
#
# time.sleep(3)

#画汽车
#清空画布
t.reset()
t.color(1,0,0)
t.begin_fill()

t.forward(100)
t.left(90)

t.forward(20)
t.left(90)

t.forward(20)
t.right(90)

t.forward(20)
t.left(90)

t.forward(60)
t.left(90)

t.forward(20)
t.right(90)

t.forward(20)
t.left(90)

t.forward(20)
t.end_fill()

t.color(0,0,0)
t.up()
t.forward(10)
t.down()
t.begin_fill()
t.circle(10)
t.end_fill()
t.setheading(0)
t.up()
t.forward(90)
t.right(90)
t.forward(10)
t.setheading(0)
t.begin_fill()
t.down()
t.circle(10)
t.end_fill()

# time.sleep(10)

